package com.sparrow.config;

public class EnvironmentVariables {
    /**
     * 后台系统访问的路径前缀
     * /manage
     */
    public static final String MANAGE_ACCESS_PREFIX = "/manage";

    /**
     * 后台页面访问路径
     */
    public static final String MANAGE_TEMPLATE_STORE_PATH = "";// 表示存放在相对的根目录中

    /**
     * 管理视图前缀
     */
    public static final String MANAGE_VIEW_PREFIX = "/manage/";

    /**
     * 文件存储的根路径
     * resources
     */
    public static final String FILE_RESOURCE_ROOT = "resources";

    /**
     * url访问文件路径前缀
     * public
     */
    public static final String FILE_ACCESS_PREFIX = "public";

    /**
     * 模板文件后缀
     */
    public static final String TEMPLATE_SUFFIX = ".html";

    /**
     * 前台静态页面模板存放路径
     */
    public static final String STATIC_TEMPLATE_STORE_PATH = "templates";

    /**
     * 网站静态资源存储文件夹名称
     */
    public static final String PORTAL_FILE_PATH = "portal";

    /**
     * 预览界面访问前缀
     */
    public static final String PREVIEW_ACCESS_PREFIX = "/preview";

    /**
     * 预览视图前缀
     */
    public static final String PREVIEW_VIEW_TEMPLATE = "preview/";

    /**
     * 获取前台静态页面发布路径
     * @return
     */
    public static String getPortalStaticPublishPath(){
        return EnvironmentVariables.FILE_RESOURCE_ROOT + "/" + EnvironmentVariables.PORTAL_FILE_PATH + "/";
    }
}
